package com.emip.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.emip.bean.YearStoreBean;
import com.emip.dao.YearStoreDAO;
import com.emip.service.YearStoreService;



@Service("yearStoreService")
public class YearStoreServiceImpl implements YearStoreService {

	@Autowired
	YearStoreDAO yearStoreDAO;
	
	public List<YearStoreBean> getByTimespan(int startYear, int endYear, String[] itemIds, String siteId) {
		return yearStoreDAO.getByTimespan(startYear, endYear, itemIds, siteId);
	}

	public YearStoreBean merge(YearStoreBean store) {
		return yearStoreDAO.merge(store);
	}

	public YearStoreBean findByYear(String year, String siteId, String itemId) {
		return yearStoreDAO.findByYear(year, siteId, itemId);
	}

	public List<YearStoreBean> getByTimespan(int startYear, int endYear,
			String[] itemIds, String siteId, int page, int size) {
		return yearStoreDAO.getByTimespan(startYear, endYear, itemIds, siteId, page, size);
	}

	public long getCount(int startYear, int endYear, String[] itemIds,
			String siteId) {
		return yearStoreDAO.getCount(startYear, endYear, itemIds, siteId);
	}

	public Object[] getStatistics(int startYear, int endYear, String itemIds,
			String siteId) {
		return yearStoreDAO.getStatistics(startYear, endYear, itemIds, siteId);
	}

}
